import { request } from "@/utils/request.js";

export function getBlueToothToken(data,header) {
  return request({
    url: '/client/paas/device/getBlueToothToken',
    method: 'POST',
    data,
	header,
	_baseUrl:'https://ebikeappdev.bsrnykj.com'
  })
}
 
// 登录获取token
export function Login(data) {
  return request({
    url: `/login`,
    method: "POST",
	data,
  });
}
// 获取用户信息
export function getUserInfor(data) {
  return request({
    url: `/user/getinfor`,
    method: "POST",
	data,
  });
}

// 保存用户信息
export function saveUserInfor(data) {
  return request({
    url: `/user/saveInfor`,
    method: "POST",
	data,
  });
}

// 获取产品列表
export function getProducts(data) {
  return request({
    url: `/product/getAllPro`,
    method: "POST",
	data,
  });
}

// 获取所有评论
export function getAllcomment(data) {
  return request({
    url: `/product/getAllcomment`,
    method: "POST",
	data,
  });
}
// 获取历史订单
export function getHistoryOrders(data) {
  return request({
    url: `/order/history`,
    method: "POST",
	data,
  });
}
// 获取未派送订单
export function getSendIngOrders(data) {
  return request({
    url: `/order/sendIngOrders`,
    method: "POST",
	data,
  });
}
// 保存订单
export function addOrder(data) {
  return request({
    url: `/order/add`,
    method: "POST",
	data,
  });
}
// 计算蓝牙密钥
export function calculateBluetooth(data) {
  return request({
    url: `/api/device/control/bluetooth/key/calculate`,
    method: "POST",
	data,
  });
}
